def my_decorator(func):

    def wrapper():
        print("函数执行前=", func.__doc__)
        func()
        print("函数执行后")

    return wrapper


@my_decorator
def say_hello():
    """say_helo函数"""
    print("Hello!")


print(say_hello().__doc__)
# 输出：
# 函数执行前
# Hello!
# 函数执行后


def decorate_operate(operate_func):

    def wrapper(x, y):
        """wrapper函数"""

        print(operate_func.__doc__)
        result = operate_func(x, y)
        print("result=", result)

    return wrapper


@decorate_operate
def math_operate(x, y):
    """x,y的四则运算"""

    return x + y


math_operate(100, 200)
